package com.ruoyi.cderp.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 物料对象 material
 *
 * @author ruoyi
 * @date 2025-06-05
 */
public class Material extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private String id;

    /** 物料编码 */
    @Excel(name = "物料编码")
    private String materialCode;

    /** 物料名称 */
    @Excel(name = "物料名称")
    private String materialName;

    /** 物料类型(1:原材料,2:半成品,3:成品,4:辅料) */
    @Excel(name = "物料类型(1:原材料,2:半成品,3:成品,4:辅料)")
    private Long materialType;

    /** 规格型号 */
    @Excel(name = "规格型号")
    private String specification;

    /** 分类ID */
    @Excel(name = "分类ID")
    private String categoryId;

    /** 分类名称 */
    @Excel(name = "分类名称")
    private String categoryName;


    /** 采购单位ID */
    private String purchaseUnitId;

    /** 采购单位名称 */
    private String purchaseUnitName;

    /** 仓储单位名称 */
    private String storageUnitName;

    /** 标准单价 */
    private BigDecimal standardPrice;



    /** 保质期(天) */
    private Long shelfLife;

    /** 存储条件 */
    private String storageCondition;

    /** 是否批次管理(0:否,1:是) */
    private Long isBatchManaged;

    /** 是否序列号管理(0:否,1:是) */
    private Long isSnManaged;

    /** 状态(0:禁用,1:启用) */
    @Excel(name = "状态(0:禁用,1:启用)")
    private Long status;

    //物料库存
    private MaterialStock materialStock;

    public MaterialStock getMaterialStock() {
        return materialStock;
    }

    public void setMaterialStock(MaterialStock materialStock) {
        this.materialStock = materialStock;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setMaterialCode(String materialCode)
    {
        this.materialCode = materialCode;
    }

    public String getMaterialCode()
    {
        return materialCode;
    }
    public void setMaterialName(String materialName)
    {
        this.materialName = materialName;
    }

    public String getMaterialName()
    {
        return materialName;
    }
    public void setMaterialType(Long materialType)
    {
        this.materialType = materialType;
    }

    public Long getMaterialType()
    {
        return materialType;
    }
    public void setSpecification(String specification)
    {
        this.specification = specification;
    }

    public String getSpecification()
    {
        return specification;
    }
    public void setCategoryId(String categoryId)
    {
        this.categoryId = categoryId;
    }

    public String getCategoryId()
    {
        return categoryId;
    }
    public void setCategoryName(String categoryName)
    {
        this.categoryName = categoryName;
    }

    public String getCategoryName()
    {
        return categoryName;
    }

    public void setPurchaseUnitId(String purchaseUnitId)
    {
        this.purchaseUnitId = purchaseUnitId;
    }

    public String getPurchaseUnitId()
    {
        return purchaseUnitId;
    }
    public void setPurchaseUnitName(String purchaseUnitName)
    {
        this.purchaseUnitName = purchaseUnitName;
    }

    public String getPurchaseUnitName()
    {
        return purchaseUnitName;
    }

    public void setStorageUnitName(String storageUnitName)
    {
        this.storageUnitName = storageUnitName;
    }

    public String getStorageUnitName()
    {
        return storageUnitName;
    }
    public void setStandardPrice(BigDecimal standardPrice)
    {
        this.standardPrice = standardPrice;
    }

    public BigDecimal getStandardPrice()
    {
        return standardPrice;
    }

    public void setShelfLife(Long shelfLife)
    {
        this.shelfLife = shelfLife;
    }

    public Long getShelfLife()
    {
        return shelfLife;
    }
    public void setStorageCondition(String storageCondition)
    {
        this.storageCondition = storageCondition;
    }

    public String getStorageCondition()
    {
        return storageCondition;
    }
    public void setIsBatchManaged(Long isBatchManaged)
    {
        this.isBatchManaged = isBatchManaged;
    }

    public Long getIsBatchManaged()
    {
        return isBatchManaged;
    }
    public void setIsSnManaged(Long isSnManaged)
    {
        this.isSnManaged = isSnManaged;
    }

    public Long getIsSnManaged()
    {
        return isSnManaged;
    }
    public void setStatus(Long status)
    {
        this.status = status;
    }

    public Long getStatus()
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("materialCode", getMaterialCode())
            .append("materialName", getMaterialName())
            .append("materialType", getMaterialType())
            .append("specification", getSpecification())
            .append("categoryId", getCategoryId())
            .append("categoryName", getCategoryName())
            .append("purchaseUnitId", getPurchaseUnitId())
            .append("purchaseUnitName", getPurchaseUnitName())
            .append("storageUnitName", getStorageUnitName())
            .append("standardPrice", getStandardPrice())
            .append("shelfLife", getShelfLife())
            .append("storageCondition", getStorageCondition())
            .append("isBatchManaged", getIsBatchManaged())
            .append("isSnManaged", getIsSnManaged())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
